package fundamentals;

import java.util.Scanner;

/**
 * @program: 编译原理
 * @description: 删除字符串头算法，符号串头，固有头
 * @author: lld
 * @create: 2021-03-15 22:13
 **/
public class Demo1 {

    public static void main(String[] args) {
        System.out.println("请输入字符串:");
        Scanner input = new Scanner(System.in);
        String str = input.next();
        char[] chars = str.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            for (int j = i; j < chars.length; j++) {
                System.out.print(chars[j]);
            }
            System.out.println();
        }
        System.out.println("空串");
        System.out.printf("其中除%s外，其他都是是固有头", str);
    }
}
